import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-stra',
  templateUrl: './stra.component.html',
  styleUrls: ['./stra.component.css']
})
export class StraComponent implements OnInit {
  star = [];
  @Input()
  starlist;
  constructor() { }

  ngOnInit() {
    // this.star = [false, false, true, true, true];
    // this.star.forEach((element, index) => {
    //   if (index < this.starlist) {
    //     this.star[index] = false;

    //   } else {
    //     this.star[index] = true;
    //   }
    // });
    for (let i = 1; i < 6; i++) {
      this.star.push(i > this.starlist);
    }

  }

}
